Sub-band coding has been shown to be an effective method of reducing the bit-rate required for the transmission of signals - see, for example Crochiere, Webber and Flanagan "Digital Coding of Speech in Sub-bands", Bell System Technical Journal, Vol. 55 pp. 1069-1085 (Oct. 1976) and Crochiere, "On the Design of Sub-band Coders for Low Bit-Rate Speech Communications, ibid Vol. 56, pp 747-779 (May-Jun. 1977).
The technique involves splitting the broadband signal into two or more frequency bands and encoding each band separately. Each band can then be down-sampled, and coding efficiency improved by using different coding strategies, which can be optimized to the statistics of the signal. This is especially advantageous for speech transmission because the coders can exploit certain perceptual effects connected with hearing. In particular, provided that appropriate quantizers are used, the technique will result in the quantization noise at the output of the codec having a similar power spectral distribution to that of the uncoded signal; it is well-known that the human ear is relatively tolerant to noise in the parts of the spectrum occupied by high level wanted signals. Additionally, the higher frequency components can be represented with reduced accuracy because the ear is less sensitive to their absolute content. Although benefits can be obtained using a fixed coding scheme, an adaptive scheme which takes account of the changing properties of the signal with time, is preferred. AFter transmission, the individual sub-bands are up-sampled and passed through interpolation filters prior to recobination.
In transform coding, a block of (say) 128 input samples is subjected to a suitable transformation such as the discrete cosine transform to produce a set of 128 coefficients; again efficiency can be improved by adaptive coding.
When adaptive bit allocation is used, the coding characteristics of the system are matched to the short-term spectrum of the input signal. One such proposal (J. M. Tribolet and R. E. Crochiere, "Frequency Domain Coding of Speech" IEEE Trans. on ASSP, Vol. ASSP-27, No. 5, Oct. 1979) utilizes a fully adaptive assignment of bits to each sub-band signal. The algorithm proposed is: ##EQU1## where R is the total number of bits available divided by the number of sub-bands N in the system, .sigma..sub.i.sup.2 is the energy of the ith sub-band signal within the time interval under consideration, R.sub.i is the number of bits allocated to the ith sub-band and .gamma. may be varied for noise shaping.
The problem with the bit allocation strategy of equation (1) is that the value of R.sub.i is usually fractional and often negative. The process of (i) rounding R.sub.i to an integer value, (ii) restricting the maximum value of R.sub.i to (typically) 5 and (iii) setting negative values of R.sub.i to 0, may result in the total number of bits allocated exceeding or falling below the number of bits available. In this case readjustments have to be made by reapplying equation (1) or by an arbitrary process of adding or subtracting bits to or from the bands. Moreover, the amount of computation involved is substantial.
According to the present invention there is provided a coder for speech signals comprising separation means for receiving speech signals and generating series of value, each series representing respective portions of the frequency spectrum of the input signal, encoding means for digitally encoding each series, and bit allocation means for varying the number of bits used for encoding the respective series in dependence on the relative energy contents thereof, characterised in that the number of series to which any given number of bits is allocated is constant, only the selector of the series to which respective numbers of bits are allocated being varied.
In another aspect the invention provides a method of coding a speech signal in which the signal is divided into separate channels representing respective portions of the frequency spectrum of the input signal, and the channels are each encoded using a variable number of bits dependent upon the relative energy contents of the channels, characterized in that the number of channels to each of which any given number of bits is allocated is constant, only the selection of the channels to which respective number of bits are allocated being varied.
The series or channels referred to may be the channels of a sub-band coder or the transform coefficients of a transform coder.
Where a scaling factor is applied to the signals, preferably the bit allocation is performed as a function of the scaling factor, so that decoding can be carried out by reference to the scale factors, avoiding the necessity for tranmission of additional side information.